using System.Net;
using System.Net.Sockets;

namespace LiteNetLib
{
	internal sealed class NetEvent
	{
		public enum EType
		{
			Connect,
			Disconnect,
			Receive,
			ReceiveUnconnected,
			Error,
			ConnectionLatencyUpdated,
			DiscoveryRequest,
			DiscoveryResponse,
			ConnectionRequest
		}

		public EType Type;

		public NetPeer Peer;

		public IPEndPoint RemoteEndPoint;

		public int Latency;

		public SocketError ErrorCode;

		public DisconnectReason DisconnectReason;

		public ConnectionRequest ConnectionRequest;

		public DeliveryMethod DeliveryMethod;

		public readonly NetPacketReader DataReader;

		public NetEvent(NetManager manager)
		{
			DataReader = new NetPacketReader(manager, this);
		}
	}
}
